<?php 
   
    //连接数据库
  
    //用户id是通过GET方法提交的
    //根据用户id从数据库中查询用户的所有信息
    $row = $data['video'];
    $vid=$_GET['vid'];
    // var_dump($row);
    $videoname=$row['videoname'];
    $tid=$row['tid'];
    $pic='upload/'.$row['pic'];
    $intro=$row['intro'];
    $uploaddate=$row['uploaddate'];
    $hittimes=$row['hittimes'];
    $downtimes=$row['downtimes'];
    $address=$row['address'];
    
    
    //将查询结果显示在表单中
 ?>

 <form method="post"  action="index.php?c=video&m=updateVideo"  enctype="multipart/form-data">
<table align="center" border="1" width=500>
<caption>修改视频信息</caption>
<tr>
  <td width="20%">vid</td>
  <td width="80%"><?php  echo $vid;  ?>
  <input type="hidden" name="vid" value=<?php  echo $vid;  ?>>  
  </td>
</tr>
<tr>
  <td>视频名称：</td>
  <td><input type="text" name="videoname" size=30  value=<?php  echo $videoname;  ?>></td>
</tr>
<tr>
<td width=150>视频类别:</td>
<td>
<select name="tid">
  <option value="0">---请选择---</option>
  <option value="1" <?php  if($tid=='1') echo 'selected';  ?>>电影</option>
  <option value="2" <?php  if($tid=='2') echo 'selected';  ?>>电视剧</option>
  <option value="3" <?php  if($tid=='3') echo 'selected';  ?>>动画片</option>
  <option value="4" <?php  if($tid=='4') echo 'selected';  ?>>爱情片</option>
  <option value="5" <?php  if($tid=='5') echo 'selected';  ?>>悬疑片</option>
      </select>
</td>
</tr>
<tr>
  <td width=150>视频封面图像：</td>   
  <td>
  <img src='<?php  echo $pic;  ?>' width=100 height=150>
  <input type="file" name="pic">
  </td>
</tr>
<tr>
<td width=150>视频简介：</td>
<td>
<textarea name="intro" cols="40" rows="5"><?php  echo $intro;  ?></textarea>
</td>
</tr>
<tr>
  <td>视频上传日期：</td>
  <td><input type="date" name="birthdate"  size=30 value=<?php  echo $birthdate;  ?>></td>
</tr>
<tr>
<td width=150>视频地址：</td>
<td>
<textarea name="address" cols="40" rows="5"><?php  echo $address;  ?></textarea>
</td>
</tr>



<tr>
<td width=150></td>
<td>
<input type="submit" value="更新">
<input type="reset" value="重置">
</td>
</tr>
</table>
</form>